//
//  HJFriendListHeaderButton.m
//  KaiChat
//
//  Created by lx on 2023/10/20.
//

#import "HJFriendListHeaderButton.h"
 

@implementation HJFriendListHeaderButton

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        
        self.highlightedBackgroundColor = UIColor.tj_selectCellBackgroundColor;
        
        UIImageView *iconImageView = [UIImageView addToView:self];
        iconImageView.contentMode = UIViewContentModeScaleAspectFill;
        [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(leftRightMargin);
            make.centerY.offset(0);
            make.width.height.offset(40);
        }];
     
        UILabel *textLabel = [UILabel lableWithSuperView:self font:UIFontMake(14) color:UIColor.tj_333333Color title:nil textAlignment:NSTextAlignmentLeft];
        [textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(iconImageView.mas_right).offset(10);
            make.centerY.offset(0);
            make.right.mas_lessThanOrEqualTo(-16);
        }];
    
        _iconImageView = iconImageView;
        _textLabel = textLabel;
    }
    return self;
}


@end
